﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using static System.Net.Mime.MediaTypeNames;

namespace HM
{
    public class DeleteNumber
    {
        #region Delete请求
        public static string Delete(string data, string url)
        {
            string responseText = "";
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url + data);
            request.Method = "DELETE";
            request.ContentType = "application/json";
            request.Headers.Add("Tracking-Api-Key", "h73buxu6-989y-uakh-yitu-sa6m9hkmaveb");

            using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
            {
                using (StreamReader reader = new StreamReader(response.GetResponseStream()))
                {
                    responseText = reader.ReadToEnd();
                    // 处理响应数据
                }
            }
            return responseText;
        }
        #endregion
    }
}
